package br.com.efacta.bagarita.controllers;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import br.com.efacta.bagarita.domain.repos.DisciplineRepository;

@Controller
public class TestController {

    @Autowired
    private DisciplineRepository disciplineRepo;

    @RequestMapping(value = "/", method = RequestMethod.GET)
    public ModelAndView test() {
        return new ModelAndView("test");
    }

    @RequestMapping(value = "/rest", method = RequestMethod.GET)
    public @ResponseBody
    Foo getFoo() {
        Foo foo = new Foo();
        foo.setId(12);
        foo.setName("bar");
        return foo;
    }
}
